package com.jddup.program.dao.handler;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

/**
 * 查询
 * Created by ZZB on 2017/9/24.
 */
public interface IQueryHandler {
    <T> T getBy(Object pk, Class<T> tClass, Connection connection) ;

    <T> T findBy(String c, Object o, Class<T> tClass, Connection connection) ;

    <T> List<T> queryBy(String c, Object o, Class<T> tClass, Connection connection) ;

    <T> long countBy(String c, Object o, Class<T> tClass, Connection connection) ;

    <T> List<T> query(String sql, Class<T> tClass, Connection connection) ;

    <T> List<T> query(String sql, Class<T> tClass, Object[] objects, Connection connection) ;

    long queryCount(String sql, Connection connection) ;

    long queryCount(String sql, Object[] objects, Connection connection) ;

    <T> T getBy(Object pk, Class<T> tClass, String tableName, Connection connection) ;

    <T> T findBy(String c, Object o, Class<T> tClass, String tableName, Connection connection) ;

    <T> List<T> queryBy(String c, Object o, Class<T> tClass, String tableName, Connection connection) ;

    <T> long countBy(String c, Object o, Class<T> tClass, String tableName, Connection connection) ;
}
